package com.waterdrop.wlsggk.service.impl;


import com.waterdrop.wlsggk.mapper.DishSalesMapper;
import com.waterdrop.wlsggk.pojo.DishSales;
import com.waterdrop.wlsggk.service.DishSalesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 菜品销售订单库信息 服务层处理
 *
 * @author ruoyi
 */
@Service
public class DishSalesServicelmpl implements DishSalesService {

    @Autowired
    private DishSalesMapper dishSalesMapper;

    /**
     * 添加菜品销售订单
     *
     * @param dishSales 菜品销售订单信息
     * @return 结果
     */
    @Override
    public int insertWlsggkDishSales(DishSales dishSales) {

        return dishSalesMapper.insertWlsggkDishSales(dishSales);
    }

    /**
     * 查询菜品销售订单数据集合
     *
     * @param dishSales 菜品销售订单信息
     * @return 菜品销售订单数据集合
     */
    @Override
    public List<DishSales> selectDishSalesList(DishSales dishSales, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime) {
        return dishSalesMapper.selectDishSalesList(dishSales, startTime, endTime);
    }

    /**
     * 删除菜品销售订单信息
     *
     * @param ids 菜品销售订单ID
     * @return 结果
     */
    @Override
    public int deleteWlsggkDishSales(Long[] ids) {
        return dishSalesMapper.deleteWlsggkDishSalesByIds(ids);
    }


}



